package com.heima.stroke.handler.valuation;

public class BasicValuation implements Valuation {
    private Valuation valuation;

    public BasicValuation(Valuation valuation){
        this.valuation = valuation;
    }

    @Override
    public float calculation(float km) {
        if (km <= 3) {
            return 13; // 起步价
        } else {
            return 13 + (km - 3) * 2.3f; // 超出3公里的计费
        }
    }
}
